import logo from './logo.svg';
import styles from './App.module.css';
import { createSignal, createEffect } from 'solid-js'

function App() {
  const [name, setName] = createSignal('刘志豪');
  createEffect(() => {
    console.log('我在更新');
  });
  return (
    <div class={styles.App}>
      <header class={styles.header}>
        <img src={logo} class={styles.logo} alt="logo" onClick={() => {
          setName('图片点击');
        }} />
        <p onClick={() => {
          setName('测试名字');
        }}>
          Edit <code>src/App.jsx</code> and save to reload.
        </p>
        <a
          class={styles.link}
          href="https://github.com/solidjs/solid"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn Solid
          {name}
        </a>
      </header>
    </div>
  );
}

export default App;
